<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>房源影响因素</title>
    <script src="https://cdn.jsdelivr.net/npm/echarts@5.3.3/dist/echarts.min.js"></script>
    <style>
        body {
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
        }

        #chart5 {
            width: 1000px;
            height: 600px;
        }
    </style>
</head>

<body>
    <div id="chart5"></div>
    <script>
        // 引入 echarts 库
        var chartDom = document.getElementById('chart5');
        var myChart = echarts.init(chartDom);
        var option;

        const data = [
            { value: 800, name: '地区' },
            { value: 735, name: '建筑面积' },
            { value: 680, name: '房屋户型' },
            { value: 584, name: '装修情况' },
            { value: 490, name: '所在楼层' },
            { value: 430, name: '梯户比例' },
            { value: 300, name: '房屋朝向' },
            { value: 260, name: '户型结构' },
            { value: 200, name: '抵押信息' },
            { value: 150, name: '建筑结构' }
        ];

        option = {
            legend: {
                top: 'bottom'
            },
            toolbox: {
                show: true,
                feature: {
                    mark: { show: true },
                    dataView: { show: true, readOnly: false },
                    restore: { show: true },
                    saveAsImage: { show: true }
                }
            },
            series: [
                {
                    name: 'Nightingale Chart',
                    type: 'pie',
                    radius: [50, 250],
                    center: ['50%', '50%'],
                    roseType: 'area',
                    itemStyle: {
                        borderRadius: 8
                    },
                    data: data
                }
            ]
        };

        option && myChart.setOption(option);
    </script>
</body>

</html>